﻿#define _CRT_SECURE_NO_WARNINGS 1 // use for depreate the warning error of scanf

#include <stdio.h>
// b[]: 要排序的数组
// n: 有多少个元素参与排序
void max20(int b[], int n)
{
	int i, m;
	m = b[0];
	for (i = 1; i < 5; i++)
	{
		if (b[i] > m)
			m = b[i];
	}
	b[n] = m;
}
void main20()
{
	int m, a[6] = { 23,45,89,12,34 };
	max20(a, 5);
	printf("Maxal value in array a is placed in a[5]，It value is %d\n", a[5]);
}
